<?php if(!defined("PATH_HD"))exit;C("SHOW_NOTICE",false);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" type="text/css" href="http://localhost/cms0121/admin/tpl/public/css/category.css" />
	<script type="text/javascript" src="http://localhost/cms0121/admin/tpl/public/js/jquery-1.8.3.js"></script>
	<script type="text/javascript">
		var cc="http://localhost/cms0121/admin.php/catgory/catgorydel";
	</script>
	<script type="text/javascript" src="http://localhost/cms0121/admin/tpl/public/js/catgory.js"></script>
	
</head>
<body>
	<h2><a href="http://localhost/cms0121/admin.php/catgory/addshow" style="font-family:微软雅黑">添加顶级栏目</a></h2>
	<table class='table1'>
		<thead>
			<tr>
	            <th width="10">CID</th>
	            <th>栏目名称</th>
	            <th width="270">操作</th>
        	</tr>
		</thead>
		<tbody>
            <?php $hd["list"]["r"]["total"]=0;
if(!empty($data)):
$hd_list_total = count($data);
$hd_list_row = min($hd_list_total,1000);
$hd_list_row = floor($hd_list_row/1);
$hd_list_id=0;
$hd_list_start=1;
$hd_list_step=0;foreach($data as $hd_list_key =>$hd_list_value):
if($hd_list_start<1){$hd_list_start++;continue;}
if($hd_list_step %1!=0){$hd_list_step++;continue;}
$hd_list_step++;$hd["list"]["r"]["first"]=$hd_list_id==0?true:false;
$hd["list"]["r"]["last"]=$hd_list_id>=$hd_list_row-1?true:false;
$hd["list"]["r"]["index"]=$hd_list_id+1;
$r=$hd_list_value;?>

                <tr>
                    <td><?php echo $r['cid'];?></td>
                    <td><?php echo $r['catname'];?></td>
                    <td>
                    	<a href="http://localhost/cms0121/index.php?c=index&m=cat&cid=<?php echo $r['cid'];?>">预览</a> |
                        <a href="http://localhost/cms0121/admin.php/catgory/addcshow/cid/<?php echo $r['cid'];?>">添加子栏目</a> |
                        <a href="http://localhost/cms0121/admin.php/catgory/editshow/cid/<?php echo $r['cid'];?>">编辑</a> |
                        <a href="http://localhost/cms0121/admin.php/arc/send/cid/<?php echo $r['cid'];?>">添加文章</a> |
                        <!-- <a href="" cid="<?php echo $r['cid'];?>" class="category">删除栏目</a> -->
                        <a href="http://localhost/cms0121/admin.php/catgory/catgorydel/cid/<?php echo $r['cid'];?>" cid="<?php echo $r['cid'];?>" class="category">删除栏目</a>
                    </td>
                </tr>
            <?php if($hd_list_id+1>=$hd_list_row){break;}
$hd_list_id++;
endforeach;
$hd["list"]["r"]["total"]=$hd_list_id+1;
endif;
?>
        </tbody>
	</table>
</body>
</html>